Integrand size = 33, antiderivative size = 167 \[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\frac {(A+i B) \operatorname {AppellF1}\left (\frac {1}{2},1,-n,\frac {3}{2},-i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right ) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{d \sqrt {\cot (c+d x)}}+\frac {(A-i B) \operatorname {AppellF1}\left (\frac {1}{2},1,-n,\frac {3}{2},i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right ) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{d \sqrt {\cot (c+d x)}} \]
[Out]
Time = 0.49 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4326, 3684, 3683, 129, 441, 440} \[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\frac {(A+i B) (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},1,-n,\frac {3}{2},-i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right )}{d \sqrt {\cot (c+d x)}}+\frac {(A-i B) (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},1,-n,\frac {3}{2},i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right )}{d \sqrt {\cot (c+d x)}} \]
[In]
[Out]
Rule 129
Rule 440
Rule 441
Rule 3683
Rule 3684
Rule 4326
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(a+b \tan (c+d x))^n (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx \\ & = \frac {1}{2} \left ((A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(1+i \tan (c+d x)) (a+b \tan (c+d x))^n}{\sqrt {\tan (c+d x)}} \, dx+\frac {1}{2} \left ((A+i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(1-i \tan (c+d x)) (a+b \tan (c+d x))^n}{\sqrt {\tan (c+d x)}} \, dx \\ & = \frac {\left ((A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {(a+b x)^n}{(1-i x) \sqrt {x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\left ((A+i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {(a+b x)^n}{(1+i x) \sqrt {x}} \, dx,x,\tan (c+d x)\right )}{2 d} \\ & = \frac {\left ((A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {\left (a+b x^2\right )^n}{1-i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}+\frac {\left ((A+i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {\left (a+b x^2\right )^n}{1+i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d} \\ & = \frac {\left ((A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {b x^2}{a}\right )^n}{1-i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}+\frac {\left ((A+i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {b x^2}{a}\right )^n}{1+i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d} \\ & = \frac {(A+i B) \operatorname {AppellF1}\left (\frac {1}{2},1,-n,\frac {3}{2},-i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right ) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{d \sqrt {\cot (c+d x)}}+\frac {(A-i B) \operatorname {AppellF1}\left (\frac {1}{2},1,-n,\frac {3}{2},i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right ) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{d \sqrt {\cot (c+d x)}} \\ \end{align*}
\[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx \]
[In]
[Out]
\[\int \sqrt {\cot \left (d x +c \right )}\, \left (a +b \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )d x\]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \sqrt {\cot \left (d x + c\right )} \,d x } \]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \left (A + B \tan {\left (c + d x \right )}\right ) \left (a + b \tan {\left (c + d x \right )}\right )^{n} \sqrt {\cot {\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \sqrt {\cot \left (d x + c\right )} \,d x } \]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \sqrt {\cot \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {\cot (c+d x)} (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \sqrt {\mathrm {cot}\left (c+d\,x\right )}\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n \,d x \]
[In]
[Out]